<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var a = 'ajjsiosssslo'
        var b = {}
        for (i = 0; i < a.length; i++) {
            var code = a[i]
            if (b[code]) {
                b[code] = b[code] + 1
            } else {
                b[code] = 1
            }
        }
        var max = 0
        var k = ''
        for (var key in b) {
            if (b[key] > max) {
                max = b[key]
                k = key
            }
        }
        console.log(max,k)
    </script>
</body>
</html>